import request from '@/utils/request'

// 查询清单整理列表
export function listArrange(query) {
  return request({
    url: '/project/arrange/list',
    method: 'get',
    params: query
  })
}

// 下载用户导入模板
export function importTemplate() {
  return request({
    url: '/project/arrange/importTemplate',
    method: 'get'
  })
}

// 整理清单
export function arrange() {
  return request({
    url: '/project/arrange/arrange',
    method: 'get'
  })
}

// 自动补全前的验证
export function beforeAutoComplementAll() {
  return request({
    url: '/project/arrange/beforeAutoComplementAll',
    method: 'get'
  })
}

// 自动补全
export function autoComplementAll() {
  return request({
    url: '/project/arrange/autoComplementAll',
    method: 'get'
  })
}

// 忽略警告
export function ignoreWarnings() {
  return request({
    url: '/project/arrange/ignoreWarnings',
    method: 'get'
  })
}

// 清空清单
export function clean() {
  return request({
    url: '/project/arrange/clean',
    method: 'get'
  })
}

// 忽略异常
export function ignore(id) {
  return request({
    url: '/project/arrange/ignore/' + id,
    method: 'get'
  })
}

// 清单补全之前
export function beforeComplement(id) {
  return request({
    url: '/project/arrange/beforeComplement/' + id,
    method: 'get'
  })
}

// 自动补全
export function autoComplement(data) {
  return request({
    url: '/project/arrange/autoComplement',
    method: 'post',
    params: data
  })
}

// 导出前先检查清单是否存在异常
export function exportCheck() {
  return request({
    url: '/project/arrange/exportCheck',
    method: 'get'
  })
}

// 导出清单整理
export function exportArrange(query) {
  return request({
    url: '/project/arrange/export',
    method: 'get',
    params: query
  })
}


